package design.strategy;

/**
 * @author GY
 * @date 2019年1月28日
 * @说明: 人类行为类
 */
public class HumanAction {
    protected Human human;
    public HumanAction() {
    }
    public HumanAction(Human human) {
        this.human = human;
    }
    public Human getHuman() {
        return human;
    }
    public void setHuman(Human human) {
        this.human = human;
    }
    /**@说明: 去上厕所*/
    public void goPee() {
        System.out.println("来到厕所");
        human.pee();
        System.out.println("洗手，离开厕所");
    }
    /**@说明: 去睡觉咯*/
    public void goSleep() {
        System.out.println("睡觉去咯...");
        human.sleep();
    }
}
